package concurrent;

public abstract class IntGenerator {
	private volatile boolean canceled = false;
	
	public abstract int next();
	
	public void cancel(int id){
		canceled = true;
		System.out.println(id +"---cancaled---");
	}
	
	public boolean isCanceled(){
		return canceled;
	}
}
